<template>
  <div id="app">
    <router-view/>
  </div>
</template>

<script>
// 放一些全局的方法
let clickPrevent
export default {
  name: 'App',
  mounted () {
    clickPrevent = () => {
      this.$store.dispatch('changeMenuStatus', {show: false})
    }
    document.addEventListener('click', clickPrevent)
    document.addEventListener('contextmenu', clickPrevent)
  },
  beforeDestroy () {
    document.removeEventListener('click', clickPrevent)
    document.removeEventListener('contextmenu', clickPrevent)
  }
}
</script>

<style>
html,body {
  height: 100%;
  margin: 0;
}
#app {
  height: 100%;
  font-family: 'KL', Arial, Helvetica, sans-serif;
  overflow: auto;
}
</style>
